package yq.test.demo.User.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import yq.test.demo.User.domain.User;

import java.util.List;

@Mapper
/**
 * 持久化jdbc
 */
public interface UserMapper {
    //实现登录验证
    User loginIn(@Param("username") String username, @Param("password") String password);
    //新增用户
    int add(User user);
    //查询所有用户
    List<User> findAll();
    //删除用户
    int deleteId(int id);
    //根据id查找用户
    User get(int id);

    int update(User user);
}
